package com.wish233.register.local;

import java.util.concurrent.ConcurrentHashMap;

/**
 * @author WHH
 * 本地服务注册类
 */
public class LocalServiceRegister {
    /**
     * 注册容器
     */
    private static final ConcurrentHashMap<String, Class<?>> REGISTER = new ConcurrentHashMap<>();

    public static void registerService(String name, Class<?> clazz) {
        REGISTER.put(name, clazz);
    }

    public static Class<?> getService(String name) {
        return REGISTER.get(name);
    }

    public static void removeService(String name) {
        REGISTER.remove(name);
    }

}
